var dataSource_ReceiveTransferInput;
var rowSelected_ReceiveTransferInput;

var currentRowSelected_ReceiveTransferInput =
{
    data: Object,
    details: Array,
    row: 0
};

function BindingData_ReceiveTransferInput(Query) {
    dataSource_ReceiveTransferInput.load
    (
		{
		    params:
			{
			    Skip: 0,
			    Take: 50,
			    Sort: '',
			    Sortdir: 'ASC',
			    target: 'Trx_BindSales',
			    param: Query
			}
		}
    );
    return dataSource_ReceiveTransferInput;
}

function BindingDataBarang_ReceiveTransferInput(Criteria, row, flag) {
    // if(flag)
    // {}
    // else
    // {
    // Ext.Ajax.request
    // (
    // {
    // url: "./Module.mvc/ExecProc",
    // params: 
    // {
    // UserID: 'Admin',
    // ModuleID: 'GetBindBarang',
    // Params:	Criteria 
    // },
    // success: function(o) 
    // {

    // var cst = Ext.decode(o.responseText);

    // if (cst.success === true) 
    // {	
    // row.data.xxx =cst.;
    // row.data.xxx =cst.;
    // row.data.xxx =cst.;
    // row.data.xxx =cst.;
    // row.data.xxx =cst.;
    // row.data.xxx =cst.;
    // }
    // // else
    // // {				

    // // };
    // }

    // }
    // );
    // }
}

function prosesGetDataBarang_ReceiveTransferInput(Criteria) {
    var params =
	{
	    Table: 'ProsesBindData',
	    BARCODE: Criteria
	}
    return params;
}

function SaveReceiveTransferInput(first) {
    if (validationReceiveTransferInput() == 1) {
        Ext.Ajax.request
            (
            {

                url: "./Datapool.mvc/CreateDataObj",
                params: DataParam_viSetKoleksiBuku(),
                success: function (o) {
                    var cst = Ext.decode(o.responseText);
                    if (cst.success === true) {
                        // ShowPesanInfo_viSetKoleksiBuku('Data berhasil di simpan','Simpan Data');
                        // Ext.get('txtId_viSetKoleksiBuku').dom.value = cst.ID_SETUP;
                        // RefreshDataEksemplar_viSetKoleksiBuku(cst.ID_SETUP);
                        // DataRefresh_viSetKoleksiBuku();
                        // addNew_viSetKoleksiBuku = false;
                    }
                    else if (cst.success === false && cst.pesan === 0) {
                        // ShowPesanWarning_viSetKoleksiBuku('Data tidak berhasil di simpan '  + cst.pesan,'Simpan Data');
                    }
                    else {
                        // ShowPesanError_viSetKoleksiBuku('Data tidak berhasil di simpan '  + cst.pesan,'Simpan Data');
                    }
                }
            }
            )
    }
}


